<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 30px;
            background-color: #ccc;
            color: red;
            margin: auto;
            text-align: center;
            line-height: 30px;
            margin-top: 200px;
            display: none;
        }
    </style>
</head>

<body>
    <input type="button" value="删除">
    <div>删除成功</div>
</body>
<script>
    document.querySelector('input').onclick = function () {
        document.querySelector('div').style.display = 'block';
        setTimeout(function () {
            document.querySelector('div').style.display = 'none';
        }, 1000)
    }
</script>

</html>